package com.mxwl.cbg.common.model.source.role;


import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class XiangRui {
    //普通
    private List<HugeHorse> normals;
    //限量
    private List<HugeHorse> nosale;

    //以下字段用于es搜索

    //祥瑞总数量
    private Integer total = 0;
    //限量祥瑞数量
    private Integer nosale_total = 0;
    //限量祥瑞的所有id
    private List<Integer> nosale_ids;
    //普通祥瑞的所有id
    private List<Integer> normals_ids;

    //添加普通祥瑞
    public void addNormals(HugeHorse hugeHorse) {
        if (normals == null) {
            normals = new ArrayList<>();
        }
        normals.add(hugeHorse);
        if (normals_ids == null) {
            normals_ids = new ArrayList<>();
        }
        normals_ids.add(hugeHorse.getKey());
    }

    public void addNosale(HugeHorse hugeHorse) {
        if (nosale == null) {
            nosale = new ArrayList<>();
        }
        nosale.add(hugeHorse);
        if (nosale_ids == null) {
            nosale_ids = new ArrayList<>();
        }
        nosale_ids.add(hugeHorse.getKey());
        nosale_total++;
    }


}
